﻿using System;

class ShipDamage
{
    static void Main()
    {
        //Telerik Academy Exam 1 @ 6 Dec 2011 Morning

        int sX1 = int.Parse(Console.ReadLine());
        int sY1 = int.Parse(Console.ReadLine());
        int sX2 = int.Parse(Console.ReadLine());
        int sY2 = int.Parse(Console.ReadLine());
        int horizon = int.Parse(Console.ReadLine());

        int cX1 = int.Parse(Console.ReadLine());
        int cY1 = int.Parse(Console.ReadLine());
        int cX2 = int.Parse(Console.ReadLine());
        int cY2 = int.Parse(Console.ReadLine());
        int cX3 = int.Parse(Console.ReadLine());
        int cY3 = int.Parse(Console.ReadLine());

        if (sX1 > sX2)
        {
            int temp = sX1;
            sX1 = sX2;
            sX2 = temp;
        }

        if (sY1 > sY2)
        {
            int newTemp = sY1;
            sY1 = sY2;
            sY2 = newTemp;
        }

        int catapultX1 = cX1;
        int catapultY1 = horizon + (horizon - cY1);

        int catapultX2 = cX2;
        int catapultY2 = horizon + (horizon - cY2);

        int catapultX3 = cX3;
        int catapultY3 = horizon + (horizon - cY3);

        int score = 0;

        if ((catapultX1 > sX1 && catapultX1 < sX2) &&       // 1-st catapult
            (catapultY1 > sY1 && catapultY1 < sY2)) 
        {
            score += 100;            
        }
        else if ((catapultX1 == sX1 || catapultX1 == sX2) &&
                (catapultY1 > sY1 && catapultY1 < sY2))
        {
            score += 50;
        }
        else if ((catapultY1 == sY1 || catapultY1 == sY2) &&
                (catapultX1 > sX1 && catapultX1 < sX2))
        {
            score += 50;
        }
        else if ((catapultX1 == sX1 && catapultY1 == sY1) ||
                (catapultX1 == sX2 && catapultY1 == sY1) ||
                (catapultX1 == sX1 && catapultY1 == sY2) ||
                (catapultX1 == sX2 && catapultY1 == sY2))
        {
            score += 25;
        }

        if ((catapultX2 > sX1 && catapultX2 < sX2) &&       // 2-nd catalupt
            (catapultY2 > sY1 && catapultY2 < sY2))
        {
            score += 100;
        }
        else if ((catapultX2 == sX1 || catapultX2 == sX2) &&
                (catapultY2 > sY1 && catapultY2 < sY2))
        {
            score += 50;
        }
        else if ((catapultY2 == sY1 || catapultY2 == sY2) &&
                (catapultX2 > sX1 && catapultX2 < sX2))
        {
            score += 50;
        }
        else if ((catapultX2 == sX1 && catapultY2 == sY1) ||
                (catapultX2 == sX2 && catapultY2 == sY1) ||
                (catapultX2 == sX1 && catapultY2 == sY2) ||
                (catapultX2 == sX2 && catapultY2 == sY2))
        {
            score += 25;
        }


        if ((catapultX3 > sX1 && catapultX3 < sX2) &&       // 3-rd catalupt
            (catapultY3 > sY1 && catapultY3 < sY2))
        {
            score += 100;
        }
        else if ((catapultX3 == sX1 || catapultX3 == sX2) &&
                (catapultY3 > sY1 && catapultY3 < sY2))
        {
            score += 50;
        }
        else if ((catapultY3 == sY1 || catapultY3 == sY2) &&
                (catapultX3 > sX1 && catapultX3 < sX2))
        {
            score += 50;
        }
        else if ((catapultX3 == sX1 && catapultY3 == sY1) ||
                (catapultX3 == sX2 && catapultY3 == sY1) ||
                (catapultX3 == sX1 && catapultY3 == sY2) ||
                (catapultX3 == sX2 && catapultY3 == sY2))
        {
            score += 25;
        }
        Console.WriteLine(score + "%");

    }
}

